<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./Promise.js?a=1"></script>
    <script>
        // 1- then函数如果不指定回调
        // const p1 = new Promise(()=>{});
        // const p2 = p1.then();
        // console.log(p2);// pending undefined;

        // const p1 = new Promise((resolve)=>{
        //     resolve(100);
        // });
        // const p2 = p1.then();
        // console.log(p2);// fulfilled 100;


        const p1 = new Promise((resolve,reject)=>{
            reject(100);
        });
        const p2 = p1.then();
        console.log(p2);// rejected 100;
    </script>
</body>
</html>